.viking-menu {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 30px;
    list-style: none;
    box-shadow: $menu-box-shadow;
    >.menu-item {
        padding: $menu-item-padding-y $menu-item-padding-x;
        cursor: pointer;
        transition: $menu-transition;
        &.is-active, &:hover {
            color: $menu-item-active-color;
        }
        &.is-disabled {
            color: $menu-item-disabled-color;
            pointer-events: none;
            cursor: default;
        }
    }
    >.submenu-item {
        position: relative;
        .submenu-title {
            display: flex;
            align-items: center;
        }
        .arrow-icon {
            margin-left: 3px;
            transition: transform .25s ease-in-out;
        }
        &:hover {
            .arrow-icon {
                transform: rotate(180deg);
            }
        }
    }
    .is-vertical {
        .arrow-icon {
            transform: rotate(0) !important;
        }
        &.is-opened {
            .arrow-icon {
                transform: rotate(180deg) !important;
            }
        }
    }
    .viking-submenu {
        flex-direction: column;
        // 不用display控制是否显示, 用CSSTransition的属性控制元素是否存在
        list-style: none;
        padding-left: 0;
        white-space: nowrap;
        >.menu-item {
            padding: $menu-item-padding-y $menu-item-padding-x;
            cursor: pointer;
            transition: $menu-transition;
            color: $body-color;
            &.is-active, &:hover {
                color: $menu-item-active-color !important;
            }
        }
    }
    .viking-submenu.menu-opened {
    }
}

.menu-horizontal {
    flex-direction: row;
    border-bottom: $menu-border-width solid $menu-border-color;
    >.menu-item {
        border-bottom: $menu-item-active-border-width solid transparent;
        &.is-active {
            border-bottom: $menu-item-active-border-width solid 
                $menu-item-active-color;
        }
    }
    .viking-submenu {
        position: absolute;
        background: $white;
        z-index: 1;
        top: 100%;
        left: 0;
        border: $menu-border-width solid $menu-border-color;
        >.menu-item {
            border-left: $menu-item-active-border-width solid transparent;
            &.is-active {
                border-bottom: 0;
                border-left: $menu-item-active-border-width 
                    solid $menu-item-active-color;
            }
        }
    }
}

.menu-vertical {
    flex-direction: column;
    border-bottom: 0;
    margin: 10px 20px;
    border-right: $menu-border-width solid $menu-border-color;
    .menu-item {
        border-left: $menu-item-active-border-width solid transparent;
        &.is-active {
            border-bottom: 0;
            border-left: $menu-item-active-border-width 
                solid $menu-item-active-color;
        }
    }
}